﻿using System.ServiceModel.Activation;
using System.ServiceModel.DomainServices.Hosting;
using System.ServiceModel.DomainServices.Server.ApplicationServices;
using log4net;

namespace RIBA.Web.Services
{
	//[ServiceBehavior(TransactionTimeout = "1")]
	//[ServiceBehavior(MaxItemsInObjectGraph = 2147483647)]

	// secure endpoint: http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2010/07/02/silverlight-and-wcf-ria-services-5-authentication.aspx

	// Network Security Access Restrictions in Silverlight: http://msdn.microsoft.com/en-us/library/cc645032(VS.95).aspx

	[EnableClientAccess(RequiresSecureEndpoint = false)]
	[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
	public class AuthenticationDomainService : AuthenticationBase<User>
	{
		private static readonly ILog _log = LogManager.GetLogger(typeof(AuthenticationDomainService));

		public AuthenticationDomainService()
		{
			_log.DebugFormat("AuthenticationDomainService.Constructor");
		}
	}

	public class User : UserBase
	{
		// NOTE: Profile properties can be added here 
		// To enable profiles, edit the appropriate section of web.config file.

		/*
		<profile>
      <properties>
        <add name="MyProfileProperty" />
      </properties>
    </profile>
		*/

		// public string MyProfileProperty { get; set; }
	}
}